Optimal. Leaf size=136 \[ \frac {f (g+h x)^2 \sqrt {a+c x^2}}{3 c h}-\frac {\left (2 \left (2 a f h^2+c \left (f g^2-3 h (e g+d h)\right )\right )+c h (f g-3 e h) x\right ) \sqrt {a+c x^2}}{6 c^2 h}+\frac {(2 c d g-a (f g+e h)) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{2 c^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 135, normalized size of antiderivative = 0.99, number of steps
used = 4, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {1668, 794, 223,
212} \begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right ) (2 c d g-a (e h+f g))}{2 c^{3/2}}-\frac {\sqrt {a+c x^2} \left (2 \left (2 a f h^2-3 c h (d h+e g)+c f g^2\right )+c h x (f g-3 e h)\right )}{6 c^2 h}+\frac {f \sqrt {a+c x^2} (g+h x)^2}{3 c h} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 223
Rule 794
Rule 1668
Rubi steps
\begin {align*} \int \frac {(g+h x) \left (d+e x+f x^2\right )}{\sqrt {a+c x^2}} \, dx &=\frac {f (g+h x)^2 \sqrt {a+c x^2}}{3 c h}+\frac {\int \frac {(g+h x) \left ((3 c d-2 a f) h^2-c h (f g-3 e h) x\right )}{\sqrt {a+c x^2}} \, dx}{3 c h^2}\\ &=\frac {f (g+h x)^2 \sqrt {a+c x^2}}{3 c h}-\frac {\left (2 \left (c f g^2+2 a f h^2-3 c h (e g+d h)\right )+c h (f g-3 e h) x\right ) \sqrt {a+c x^2}}{6 c^2 h}+\frac {(2 c d g-a f g-a e h) \int \frac {1}{\sqrt {a+c x^2}} \, dx}{2 c}\\ &=\frac {f (g+h x)^2 \sqrt {a+c x^2}}{3 c h}-\frac {\left (2 \left (c f g^2+2 a f h^2-3 c h (e g+d h)\right )+c h (f g-3 e h) x\right ) \sqrt {a+c x^2}}{6 c^2 h}+\frac {(2 c d g-a f g-a e h) \text {Subst}\left (\int \frac {1}{1-c x^2} \, dx,x,\frac {x}{\sqrt {a+c x^2}}\right )}{2 c}\\ &=\frac {f (g+h x)^2 \sqrt {a+c x^2}}{3 c h}-\frac {\left (2 \left (c f g^2+2 a f h^2-3 c h (e g+d h)\right )+c h (f g-3 e h) x\right ) \sqrt {a+c x^2}}{6 c^2 h}+\frac {(2 c d g-a (f g+e h)) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{2 c^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.41, size = 96, normalized size = 0.71 \begin {gather*} \frac {\sqrt {a+c x^2} \left (-4 a f h+c \left (6 e g+6 d h+3 f g x+3 e h x+2 f h x^2\right )\right )+3 \sqrt {c} (-2 c d g+a f g+a e h) \log \left (-\sqrt {c} x+\sqrt {a+c x^2}\right )}{6 c^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 126, normalized size = 0.93
method | result | size |
risch | \(-\frac {\left (-2 h f c \,x^{2}-3 e h x c -3 f g x c +4 a f h -6 c d h -6 c e g \right ) \sqrt {c \,x^{2}+a}}{6 c^{2}}-\frac {\ln \left (x \sqrt {c}+\sqrt {c \,x^{2}+a}\right ) a e h}{2 c^{\frac {3}{2}}}-\frac {\ln \left (x \sqrt {c}+\sqrt {c \,x^{2}+a}\right ) a f g}{2 c^{\frac {3}{2}}}+\frac {d g \ln \left (x \sqrt {c}+\sqrt {c \,x^{2}+a}\right )}{\sqrt {c}}\) | \(122\) |
default | \(h f \left (\frac {x^{2} \sqrt {c \,x^{2}+a}}{3 c}-\frac {2 a \sqrt {c \,x^{2}+a}}{3 c^{2}}\right )+\left (e h +g f \right ) \left (\frac {x \sqrt {c \,x^{2}+a}}{2 c}-\frac {a \ln \left (x \sqrt {c}+\sqrt {c \,x^{2}+a}\right )}{2 c^{\frac {3}{2}}}\right )+\frac {\left (d h +e g \right ) \sqrt {c \,x^{2}+a}}{c}+\frac {d g \ln \left (x \sqrt {c}+\sqrt {c \,x^{2}+a}\right )}{\sqrt {c}}\) | \(126\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 129, normalized size = 0.95 \begin {gather*} \frac {\sqrt {c x^{2} + a} f h x^{2}}{3 \, c} + \frac {d g \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {c}} + \frac {\sqrt {c x^{2} + a} d h}{c} - \frac {2 \, \sqrt {c x^{2} + a} a f h}{3 \, c^{2}} + \frac {\sqrt {c x^{2} + a} {\left (f g + h e\right )} x}{2 \, c} - \frac {{\left (f g + h e\right )} a \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{2 \, c^{\frac {3}{2}}} + \frac {\sqrt {c x^{2} + a} g e}{c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 205, normalized size = 1.51 \begin {gather*} \left [\frac {3 \, {\left (a h e - {\left (2 \, c d - a f\right )} g\right )} \sqrt {c} \log \left (-2 \, c x^{2} + 2 \, \sqrt {c x^{2} + a} \sqrt {c} x - a\right ) + 2 \, {\left (2 \, c f h x^{2} + 3 \, c f g x + 2 \, {\left (3 \, c d - 2 \, a f\right )} h + 3 \, {\left (c h x + 2 \, c g\right )} e\right )} \sqrt {c x^{2} + a}}{12 \, c^{2}}, \frac {3 \, {\left (a h e - {\left (2 \, c d - a f\right )} g\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {-c} x}{\sqrt {c x^{2} + a}}\right ) + {\left (2 \, c f h x^{2} + 3 \, c f g x + 2 \, {\left (3 \, c d - 2 \, a f\right )} h + 3 \, {\left (c h x + 2 \, c g\right )} e\right )} \sqrt {c x^{2} + a}}{6 \, c^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 3.83, size = 282, normalized size = 2.07 \begin {gather*} \frac {\sqrt {a} e h x \sqrt {1 + \frac {c x^{2}}{a}}}{2 c} + \frac {\sqrt {a} f g x \sqrt {1 + \frac {c x^{2}}{a}}}{2 c} - \frac {a e h \operatorname {asinh}{\left (\frac {\sqrt {c} x}{\sqrt {a}} \right )}}{2 c^{\frac {3}{2}}} - \frac {a f g \operatorname {asinh}{\left (\frac {\sqrt {c} x}{\sqrt {a}} \right )}}{2 c^{\frac {3}{2}}} + d g \left (\begin {cases} \frac {\sqrt {- \frac {a}{c}} \operatorname {asin}{\left (x \sqrt {- \frac {c}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge c < 0 \\\frac {\sqrt {\frac {a}{c}} \operatorname {asinh}{\left (x \sqrt {\frac {c}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge c > 0 \\\frac {\sqrt {- \frac {a}{c}} \operatorname {acosh}{\left (x \sqrt {- \frac {c}{a}} \right )}}{\sqrt {- a}} & \text {for}\: c > 0 \wedge a < 0 \end {cases}\right ) + d h \left (\begin {cases} \frac {x^{2}}{2 \sqrt {a}} & \text {for}\: c = 0 \\\frac {\sqrt {a + c x^{2}}}{c} & \text {otherwise} \end {cases}\right ) + e g \left (\begin {cases} \frac {x^{2}}{2 \sqrt {a}} & \text {for}\: c = 0 \\\frac {\sqrt {a + c x^{2}}}{c} & \text {otherwise} \end {cases}\right ) + f h \left (\begin {cases} - \frac {2 a \sqrt {a + c x^{2}}}{3 c^{2}} + \frac {x^{2} \sqrt {a + c x^{2}}}{3 c} & \text {for}\: c \neq 0 \\\frac {x^{4}}{4 \sqrt {a}} & \text {otherwise} \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.33, size = 110, normalized size = 0.81 \begin {gather*} \frac {1}{6} \, \sqrt {c x^{2} + a} {\left ({\left (\frac {2 \, f h x}{c} + \frac {3 \, {\left (c^{2} f g + c^{2} h e\right )}}{c^{3}}\right )} x + \frac {2 \, {\left (3 \, c^{2} d h - 2 \, a c f h + 3 \, c^{2} g e\right )}}{c^{3}}\right )} - \frac {{\left (2 \, c d g - a f g - a h e\right )} \log \left ({\left | -\sqrt {c} x + \sqrt {c x^{2} + a} \right |}\right )}{2 \, c^{\frac {3}{2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.17, size = 227, normalized size = 1.67 \begin {gather*} \left \{\begin {array}{cl} \frac {2\,f\,g\,x^3+3\,e\,g\,x^2+6\,d\,g\,x}{6\,\sqrt {a}}+\frac {3\,f\,h\,x^4+4\,e\,h\,x^3+6\,d\,h\,x^2}{12\,\sqrt {a}} & \text {\ if\ \ }c=0\\ \frac {d\,g\,\ln \left (\sqrt {c}\,x+\sqrt {c\,x^2+a}\right )}{\sqrt {c}}+\frac {d\,h\,\sqrt {c\,x^2+a}}{c}+\frac {e\,g\,\sqrt {c\,x^2+a}}{c}+\frac {e\,h\,x\,\sqrt {c\,x^2+a}}{2\,c}+\frac {f\,g\,x\,\sqrt {c\,x^2+a}}{2\,c}-\frac {f\,h\,\sqrt {c\,x^2+a}\,\left (2\,a-c\,x^2\right )}{3\,c^2}-\frac {a\,e\,h\,\ln \left (2\,\sqrt {c}\,x+2\,\sqrt {c\,x^2+a}\right )}{2\,c^{3/2}}-\frac {a\,f\,g\,\ln \left (2\,\sqrt {c}\,x+2\,\sqrt {c\,x^2+a}\right )}{2\,c^{3/2}} & \text {\ if\ \ }c\neq 0 \end {array}\right . \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________